{
// ...
// "permissions":{
// 	// ...
// 	"SQLite": {
// 		"description": "SQLite数据库"
// 	}
// }
}

// 打开数据库
function openDB(){
	document.addEventListener('plusready', function(){
		plus.sqlite.openDatabase({
			name: 'pad',
			path: '_doc/pad.db',
			success: function(e){
				console.log('openDatabase success!');
			},
			fail: function(e){
				alert("数据库连接失败！"+JSON.stringify(e));
				console.log('openDatabase failed: '+JSON.stringify(e));
			}
		});
	});
	
}
// 执行事务
function transactionDB(){
	plus.sqlite.transaction({
		name: 'pad',
		operation: 'begin',
		success: function(e){
			console.log('transaction success!');
		},
		fail: function(e){
			console.log('transaction failed: '+JSON.stringify(e));
		}
	});
}
function transactionDBcommit(){
	plus.sqlite.transaction({
		name: 'pad',
		operation: 'commit',
		success: function(e){
			console.log('transaction success!');
		},
		fail: function(e){
			console.log('transaction failed: '+JSON.stringify(e));
		}
	});
}

// 执行SQL语句
function executeSQL(sql){
	// document.addEventListener('plusready', function(){
		plus.sqlite.executeSql({
		name: 'pad',
		sql: sql,
		success: function(e){
			alert("操作成功！");
			console.log('executeSql success!');
			// plus.sqlite.executeSql({
			// 	name: 'sfpad',
			// 	sql: "insert into database values('北京','安乐林','11')",
			// 	success: function(e){
			// 		console.log('executeSql success!');
			// 	},
			// 	fail: function(e){
			// 		console.log('executeSql failed: '+JSON.stringify(e));
			// 	}
			// });
		},
		fail: function(e){
			alert("操作失败！"+JSON.stringify(e));
			console.log('executeSql failed: '+JSON.stringify(e));
		}
	// });
	});
}
// 查询SQL语句
function selectSQL(sql){
	var returnData = null;
	document.addEventListener('plusready', function(){
	plus.sqlite.selectSql({
		name: 'pad',
		sql: sql,
		success: function(data){
			console.log('selectSql success: ');
			for(var i in data){
				console.log(data[i].name);
			}
			returnData = data;
		},
		fail: function(e){
			console.log('selectSql failed: '+JSON.stringify(e));
		}
	});
	});
	return returnData;
}


// 关闭数据库
function closeDB(){
	plus.sqlite.closeDatabase({
		name: 'pad',
		success: function(e){
			console.log('closeDatabase success!');
		},
		fail: function(e){
			console.log('closeDatabase failed: '+JSON.stringify(e));
		}
	});
}

// function saveInfo(){
// 	openDB();
// 	}